function [portfolio_codes porfolio_weights portfolio_date portfolio_close_price portfolio_volume] ...
                    = loadPortfolio(market, number_of_stocks, index)
    if (strcmp(market, 'VNINDEX'))
        data = load(strcat('data\dtPortfolio_HOSE_', mat2str(number_of_stocks), '_', mat2str(index), '.mat'));
    elseif (strcmp(market, 'HNXINDEX'))
        data = load(strcat('data\dtPortfolio_HNX_', mat2str(number_of_stocks), '_', mat2str(index), '.mat'));
    end
    portfolio_codes = data.portfolio_codes_t;
    porfolio_weights = data.porfolio_weights_t;
    portfolio_date = data.portfolio_date_t;
    portfolio_close_price = data.portfolio_close_price_t;
    portfolio_volume = data.portfolio_volume_t;
end